﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace TesteOnline
{
    public partial class TestForm1 : System.Web.UI.Page
    {
        int i = 1;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack)
            {
                Response.Write("PostBack");
                Response.Write(i.ToString());
            }
            else
            {
                Response.Write("not PostBack");
                Response.Write(i.ToString());
            }
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            Response.Write("Button<br />");
            Response.Write(i.ToString());
            Response.Write("Button<br />");
            Response.Write(ListBox1.SelectedValue);
            i++;
        }
    }
}